﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:splx="clr-namespace:Suplex.Wpf;assembly=Suplex.Wpf"
    >
    <Style TargetType="Window" x:Key="AppDlg">
        <Setter Property="AllowsTransparency" Value="true" />
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="ResizeMode" Value="CanResizeWithGrip" />
    </Style>
    <LinearGradientBrush x:Key="MenuButtonNormalBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#99E0FFFF" Offset="0.0" />
        <!--99-->
        <GradientStop Color="#9987CEEB" Offset="0.55" />
        <GradientStop Color="#99E0FFFF" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MenuButtonHoverBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ffE0FFFF" Offset="0.0" />
        <GradientStop Color="#ff87CEEB" Offset="0.55" />
        <GradientStop Color="#ffE0FFFF" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="MenuPressedHoverBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ff87CEEB" Offset="0.0" />
        <GradientStop Color="#ffE0FFFF" Offset="0.55" />
        <GradientStop Color="#ff87CEEB" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="GradientBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ffdddddd" Offset="0.0" />
        <GradientStop Color="#ffeeeeee" Offset="0.55" />
        <GradientStop Color="#ffdddddd" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SysHoverBrushX" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ffdf0000" Offset="0.0" />
        <GradientStop Color="#ff8b0000" Offset="0.75" />
        <GradientStop Color="#ffdf0000" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SysHoverBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ff60B2D1" Offset="0.0" />
        <GradientStop Color="#ff2B526A" Offset="0.75" />
        <GradientStop Color="#ff60B2D1" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SysPressedBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ff373737" Offset="0.0" />
        <GradientStop Color="#ff898989" Offset="0.25" />
        <GradientStop Color="#ff373737" Offset="1" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="SysTitleBrush" StartPoint="0.5,0" EndPoint="0.5,1">
        <GradientStop Color="#ff373737" Offset="0.0" />
        <GradientStop Color="#ff565656" Offset="0.5" />
        <GradientStop Color="#ff565656" Offset="1" />
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MenuButtonDisabledBrush" Color="#ff87CEEB" />
    <Style TargetType="splx:SplxBorderButton" x:Key="MenuButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="splx:SplxBorderButton">
                    <Border x:Name="Border" Background="{StaticResource MenuButtonNormalBrush}" CornerRadius="{TemplateBinding splx:SplxBorderButton.CornerRadius}">
                        <ContentPresenter Content="{TemplateBinding Button.Content}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MenuButtonHoverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MenuButtonHoverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MenuPressedHoverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MenuButtonDisabledBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="splx:SplxBorderButton" x:Key="SysButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="splx:SplxBorderButton">
                    <Border x:Name="Border" BorderBrush="DimGray" BorderThickness="1"
                                CornerRadius="{TemplateBinding splx:SplxBorderButton.CornerRadius}">
                        <ContentPresenter Content="{TemplateBinding Button.Content}"
                                VerticalAlignment="Center" HorizontalAlignment="Center" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource SysHoverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource SysHoverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource SysPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MenuButtonDisabledBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="splx:SplxBorderButton" x:Key="SysButtonX">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="splx:SplxBorderButton">
                    <Border x:Name="Border" BorderBrush="DimGray" BorderThickness="1"
                                CornerRadius="{TemplateBinding splx:SplxBorderButton.CornerRadius}">
                        <ContentPresenter Content="{TemplateBinding Button.Content}"
                                VerticalAlignment="Center" HorizontalAlignment="Center" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsKeyboardFocused" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource SysHoverBrushX}"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource SysHoverBrushX}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource SysPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource MenuButtonDisabledBrush}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Image x:Key="IconAdd" Source="/Suplex;component/Resources/file_add.png"/>
    <Image x:Key="IconEdit" Source="/Suplex;component/Resources/file_edit.png"/>
    <Image x:Key="IconDelete" Source="/Suplex;component/Resources/file_delete.png"/>




    <Style x:Key="ValidationErrorTemplate" TargetType="{x:Type Control}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Control}">
                    <Border Name="Border" CornerRadius="2" Padding="2" Background="Orange" BorderBrush="Red" BorderThickness="1" >
                        <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>